import rq from 'axios';
import * as API from '../constants/api';

export function getEmployeeList (params, actionType) {
    return async function (dispatch) {
        // 拿数据
        const res = await rq({
            url: API[window.DATA_MODE].EMPLOYEES,
            method: 'GET',
            params,
        });
        // 给store
        dispatch({
            type: actionType,
            value: res,
        });
    };
}
